package org.joa.manager;

import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import org.joa.actor.Actor;
import org.joa.actor.ActorName;
import org.joa.actor.exception.RemoteException;
import org.joa.actor.transaction.Transaction;
import org.joa.manager.exception.TransactionLockTimeoutException;

public interface ActorManagerInterface {

    public Serializable createActorProxy(ActorName owner, Class<? extends Actor> actorClass,
        Class<?> interfaceClass);

    public Serializable createActorProxy(ActorName remote, ActorName owner, Class<?> interfaceClass);

    /**
     * Invoke a method on the actor with the given name
     */
    public Serializable invoke(ActorName actorName, String methodName, Serializable[] params,
        Transaction transaction) throws IOException, ClassNotFoundException,
        IllegalArgumentException, IllegalAccessException, InvocationTargetException,
        TransactionLockTimeoutException, RemoteException;
}
